package cn.enjoy.design.behavior.chain;

import lombok.Data;

/**
 * @author K
 * @date 2021/11/16 21:12
 */
@Data
public abstract class AbstractCheck {

    private AbstractCheck abstractCheck;

    public void check() {
        doCheck();
        if (getAbstractCheck() != null) {
            getAbstractCheck().check();
        }
    }

    public abstract void doCheck();
}
